<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="time"></div>
  <script>
    function time(){
      var date = new Date();
      var day = date.getDay();
      var hours = date.getHours();
      var minutes = date.getMinutes();
      var seconds = date.getSeconds();
      var week = ["日","一","二","三","四","五","六"];
      var str = "周" + week[day];  
      document.getElementById('time').innerHTML = str+'['+ hours +':' + minutes + ':' + seconds +']';
      
    }
   setInterval('time()',1000);
    
  </script>
</body>
</html>